const { getSetting, updateSetting } = require("../Dao/settingDao");
const { FormatJson } = require("../utils/tool");

// 获取全局设置
module.exports.getSettingServices = async function () {
    const data = await getSetting();
    delete data.deletedAt;
    return FormatJson(0, "", data)
}

// 修改全局设置
module.exports.updateSettingServices = async function (settingInfo) {
    await updateSetting(settingInfo);
    const data = await getSetting();
    delete data.deletedAt;
    return FormatJson(0, "", data)
}